#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <queue>

using namespace std;


typedef long long ll;

using pii = pair<int, int>;
using minheap = priority_queue<int, vector<int>, greater<int> >;

#define x first
#define y second

const int N = 2e5 + 5;

int n, m, a, b;
struct Edge {
    int to, next;
} e[N << 1];

int head[N], idx = 1, in[N];

void add_edge(int u, int v) {
    e[idx].to = v;
    e[idx].next = head[u];
    head[u] = idx++;
}

void clear_graph() {
    memset(head, -1, sizeof(head));
    memset(e, 0, sizeof(e));
    memset(in, 0, sizeof(in));
    idx = 1;
}

vector<int> path;

int bfs() {
    minheap p;
    for (int i = 1; i <= n; i++)
        if (!in[i])
            p.push(i);

    int rounds = 1, cnt = 0;
    while (!p.empty()) {
        auto t = p.top();
        p.pop();

        path.push_back(t);
        cnt++, rounds = max(rounds, t);

        for (int i = head[t]; ~i; i = e[i].next) {
            int j = e[i].to;
            in[j]--;
            if (in[j] == 0) {
                p.push(j);
            }
        }
    }

    if (cnt == n) return rounds;
    else return -1;
}

int main() {
    cin >> n >> m;
    clear_graph();
    for (int i = 1; i <= m; i++) {
        cin >> a >> b;
        add_edge(a, b);
        in[b]++;
    }

    int res = bfs();
    if (res == -1) {
        cout << -1 << endl;
        return 0;
    }

    for (auto i : path) 
        cout << i << ' ';
    cout << endl;
    return 0;

}